home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 190 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: ambiguous typedef
  5. Date: 29 Jan 1996 16:05:55 GMT
  6. Organization: Computer Science, University of Melbourne, Australia
  7. Sender: news@cs.mu.OZ.AU (CS-Usenet)
  8. Approved: clamage@eng.sun.com (comp.std.c++)
  9. Message-ID: <9602921.25314@mulga.cs.mu.OZ.AU>
  10. References: <199601290522.OAA29067@k4.k2.t.u-tokyo.ac.jp>
  11. NNTP-Posting-Host: 129.146.88.126
  12. Originator: clamage@taumet
  13.  
  14. TABATA Tomohira <loba@k2.t.u-tokyo.ac.jp> writes:
  15.  
  16. >Can't I use this declaration successfully?
  17.  
  18. >   class T1 {
  19. >   public:
  20. >      typedef T1 myclass;
  21. >   };
  22.  
  23. >   class T2 {
  24. >   public:
  25. >      typedef T2 myclass;
  26. >   };
  27.  
  28. >   class T3 : public T1, T2 {
  29. >   public:
  30. >      typedef T3 myclass;
  31. >   };
  32.  
  33. That code is strictly conforming (i.e. perfectly legal).
  34.  
  35. >By gcc-2.7.1 this cannot be compiled because of "request for member
  36. >`myclass' is ambiguous" on the line "typedef T3 myclass;".
  37.  
  38. This is a bug in gcc.
  39.  
  40. --
  41. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  42. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  43.  
  44. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  45.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  46.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  47.  
  48.